import engine from './engine'
let str = `
<div>
  <ul>
    {{#students}}
    <li>
      <p style="color:red">{{name}} 的爱好是</p>
        <ol>
          {{#hobbies}}
          <li>{{.}}</li>
          {{/hobbies}}
        </ol>
    </li>
    {{/students}}
  </ul>
</div>
`
let data = {
  students: [
    { name: '小明', hobbies: ["游泳", '健身'] },
    { name: '小红', hobbies: ["足球", '篮球', '羽毛球'] },
    { name: '小强', hobbies: ["吃饭", '睡觉'] },
  ]
}
let app = document.getElementById('app')
app.innerHTML = engine(str, data)
